<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 可被三整除的偶数的平均值 -->
    <script>
      var averageValue = function (nums) {
        return (nums = nums.filter(n => n % 6 == 0)) && nums.length && (nums.reduce((a, c) => a + c) / nums.length) | 0
      }
      console.log(averageValue([1, 2, 4, 7, 10]))
    </script>
  </body>
</html>
